package com.mlk.score.api;

import com.mlk.core.component.page.Pager;
import com.mlk.core.util.ServerResponse;
import com.mlk.score.po.EngScore;
import com.mlk.score.service.EngInScoreService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Api("积分收入")
@RestController
@RequestMapping("/api/EngInScore")
public class EngInScoreApi {

    @Resource
    private EngInScoreService engInScoreService;
    /**
     * 总积分
     */
    @GetMapping("findTotalScore")
    @ApiOperation("总积分")
    public ServerResponse findTotalScore(String openId){
        return this.engInScoreService.findTotalScore(openId);
    }

    /**
     * 总积分明细
     */
    @GetMapping("findTotalScoreDetail")
    @ApiOperation("总积分明细")
    public Pager findTotalScoreDetail(EngScore score){
        return this.engInScoreService.findTotalScoreDetail(score);
    }
}
